<include file="__THEME__/header" />


<script type="text/javascript" src="../Public/Js/Common.js"></script>
 <script type="text/javascript" src="../Public/Js/json2select.js" ></script>
<link  href="../Public/group.css" rel="stylesheet" type="text/css"/>
<script>
	function checkeditform(v_form)
{
	if (getstrlen(v_form.name.value) == 0)
	{
		alert("请输入群名称！");
		v_form.name.focus();
		return false;
	}
	else if (getstrlen(v_form.name.value) > 60)
	{
		alert("群名称超长！");
		v_form.name.focus();
		return false;
	}
	else if (getstrlen(v_form.intro.value) == 0)
	{
		alert("请输入群介绍！");
		v_form.intro.focus();
		return false;
	}
	
	//$("btn_qd").disabled  = true;
	
	return true;
}


	function getstrlen(chars){ 
		
		chars = chars.replace(/^\s+|\s+$/g,"");
		return chars.replace(/[^\x00-\xff]/g,"xx").length; 
   }
   
</script>

</head>

<body>

<div class="content"><!-- 内容 begin  -->

  <!-- 用户组件列表 begin -->
   <include file="__THEME__/apps" />      
  <!-- 用户组件列表 end -->
  
  
  <div class="main"> <!-- 右侧内容 begin  -->
  
 <include file="../Public/manage_group_top" />
  
  
  <div class="groupBox">
  <div class="boxL" style="width:100%;">
  	<div class="msg" id="msg" style="display:none;">修改成功</div>
    <div class="box1">
  	<h4>设置群的基本信息：</h4>
  	<form name="editform" action="__URL__/index" method="post" onsubmit="javascript:return checkeditform(this);" enctype="multipart/form-data">
    <ul class="pt10">
          <li class="li">
          	<div class="lh20 alR left" style="width:10%"><strong>群名称：</strong></div>
            <div class="left" style="width:85%"><span class="left" style="width:90%">
              <input name="name" value="{$groupinfo['name']}" class="TextH20" style="width: 50%;" onblur="this.className='TextH20'" onfocus="this.className='Text2'" type="text" />
            </span></div>
       	  </li>
          <li class="li pt10">
          	<div class="left alR" style="width:10%"><strong>群介绍：</strong></div>
            <div class="left" style="width:85%"><textarea name="intro" rows="10"  style="padding: 8px; width: 70%;" class="Text" onBlur="this.className='Text'" onFocus="this.className='Text1'">{$groupinfo['intro']}</textarea>
            </div>
       	  </li>
          <li class="li pt10">
          	<div class="lh20 alR left" style="width:10%"><strong>群分类：</strong></div>
            <div class="left" style="width:85%" id="pid">
   
            </div>
       	  </li>
          <li class="li pt10">
          	<div class="lh20 alR left" style="width:10%"><strong>群人数：</strong></div>
            <div class="left lh20" style="width:85%">{$groupinfo['membercount']}人
            </div>
       	  </li>
          <li class="li pt10">
          	<div class="lh20 alR left" style="width:10%"><strong>群图标：</strong></div>
            <div class="left" style="width:85%"><span class="pic80 left"><img src="__ROOT__/thumb.php?w=80&h=80&url={$groupinfo['logo']|get_photo_url}"/></span><span class="left lh25 pl10">
              
换用其它图标：<br /><input type="file" name="logo" />
            </span></div>
          </li>
         
          <li class="li pt10">
          	<div class="lh20 alR left" style="width:10%">&nbsp;</div>
            <div class="left" style="width:85%">
            <input type="hidden" name="gid" value="{$gid}">
            <input type="hidden" name="editsubmit" value="1" >
            <input name="button" type="submit" class="btn_b mt5" id="button" value="保存设置" />
            </div>
       	  </li>
          </ul>
          </form>
    </div>
    
    </div>
  <!-- end  -->
  </div>  </div><!-- 右侧内容 end  -->
  <div class="c"></div>
</div><!-- 内容 end -->

 <script type="text/javascript">
	 	
		 var category_json	=	{:getCategorySelect(0)};
		 $("#pid").json2select(category_json,[{$groupinfo['cid0']},{$groupinfo['cid1']}],'cid');
		 //$('#msg').hide();
		 <php> if($success){</php> $('#msg').show();$('#msg').fadeOut(2000); <php>}</php>
</script>


<include file="__THEME__/footer" />

</body>
</html>
